package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author du
 * date 2018/7/28 下午10:18
 */
public class GoodQuestionResult extends ListDataEntity implements Parcelable{
    /**
     * list : [{"id":70499,"genre":1,"question_type":3,"question_id":4251,"question_nav":"一年级知识点 > 应用题 > 摸彩球 > 例1-可能性大小","question_title":"<p>小丽想不摸到蓝色珠子，请问她应该摸第________个盒子？<\/p><p><img src=\"http://7xu137.com1.z0.glb.clouddn.com/ueditor_20161213_584f624e3905b.png\" title=\"blob.png\" alt=\"blob.png\"/><\/p>","exercises_answer":[""],"correct_answer":["3"],"explain_ex":"<p>第3个盒子里没有蓝色珠子，所以不会摸到蓝色的珠子<\/p>","subtime":1512663287,"good_key":"VxUJQFEMAQE"}]
     * category : [{"id":1,"name":"分类名"}]
     * page_num : 1
     */

    private List<SubjectEntity> list;
    private List<CategoryEntity> category;

    public List<SubjectEntity> getList() {
        return list;
    }

    public void setList(List<SubjectEntity> list) {
        this.list = list;
    }

    public List<CategoryEntity> getCategory() {
        return category;
    }

    public void setCategory(List<CategoryEntity> category) {
        this.category = category;
    }

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeTypedList(this.list);
        dest.writeTypedList(this.category);
    }

    public GoodQuestionResult() {}

    protected GoodQuestionResult(Parcel in) {
        super(in);
        this.list = in.createTypedArrayList(SubjectEntity.CREATOR);
        this.category = in.createTypedArrayList(CategoryEntity.CREATOR);
    }

    public static final Creator<GoodQuestionResult> CREATOR = new Creator<GoodQuestionResult>() {
        @Override
        public GoodQuestionResult createFromParcel(Parcel source) {return new GoodQuestionResult(source);}

        @Override
        public GoodQuestionResult[] newArray(int size) {return new GoodQuestionResult[size];}
    };
}
